<!--
 * @Author: huangyq
 * @Date: 2022-04-25 13:43:04
 * @LastEditTime: 2023-12-06 09:46:14
 * @LastEditors: hyq
 * @Description: 下拉框
 * @FilePath: /haotian-operation-manage-system-pc-client/src/components/hq-form/fields/hq-input-number/index.vue
-->
<template>
  <el-input-number
    v-model="query[props.field.prop]"
    :min="props.field.min"
    :max="props.field.max"
    v-bind="props.field.attrs"
  ></el-input-number>
  <span class="unit">{{ field.unit }}</span>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { IInputNumberFieldItem } from '../../interface'

interface IProps {
  models: Record<string, any>
  field: IInputNumberFieldItem
}

const props = withDefaults(defineProps<IProps>(), {})
const query = computed(() => {
  return props.models
})
</script>
<style scoped lang="scss">
.unit {
  font-size: 14px;
  color: #666;
  padding: 0 5px;
}
</style>
